﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ershou.BLL;

public partial class jg_spxq : System.Web.UI.Page
{
    public sp sp1 = new sp();
    public yh yh1 = new yh();
    protected void Page_Load(object sender, EventArgs e)
    {
        Label16.Text = "";

        string x = sp1.select1(int.Parse(Request.QueryString["ID"]));
        Image1.ImageUrl = x;

        Label1.Text = sp1.select7(int.Parse(Request.QueryString["ID"]));

        Label11.Text = sp1.select3(int.Parse(Request.QueryString["ID"]));
        Label12.Text = sp1.select4(int.Parse(Request.QueryString["ID"])) + "元";
        Label13.Text = sp1.select5(int.Parse(Request.QueryString["ID"])) + "元";
        Label14.Text = sp1.select6(int.Parse(Request.QueryString["ID"]));
        TextBox3.Text = sp1.select18(int.Parse(Request.QueryString["ID"]));
        DateTime t = sp1.select8(int.Parse(Request.QueryString["ID"]));
        DateTime nowdate = DateTime.Now;
        if (nowdate < t)
        {
            Label2.Text = "距开始拍卖还剩：";
        }
    }

    public string nowtime()
    {
        DateTime t = sp1.select8(int.Parse(Request.QueryString["ID"]));
        DateTime nowdate = DateTime.Now;
        string a = t.Year.ToString();
        string b = t.Month.ToString();
        string c = t.Day.ToString();
        string d = t.Hour.ToString();
        string e = t.Minute.ToString();
        string f = t.Second.ToString();
        if (Convert.ToInt32(b) < 10)
        {
            b = "0" + b;
        }
        if (Convert.ToInt32(c) < 10)
        {
            c = "0" + c;
        }
        if (Convert.ToInt32(d) < 10)
        {
            d = "0" + d;
        }
        if (Convert.ToInt32(e) < 10)
        {
            e = "0" + e;
        }
        if (Convert.ToInt32(f) < 10)
        {
            f = "0" + f;
        }
        return a + "-" + b + "-" + c + "T" + d + ":" + e + ":" + f;
    }

    public string getmoney()
    {
        string money1 = sp1.select2(int.Parse(Request.QueryString["ID"]));
        string name = sp1.selectmj(int.Parse(Request.QueryString["ID"]));
        return money1 + "元(" + name + ")";
    }

    protected void Button3_Click(object sender, EventArgs e)
    {
        Label16.Text = "本按钮仅用于预览页面效果!";
    }

    protected void TextBox3_TextChanged(object sender, EventArgs e)
    {

    }
}